package model;

import interfaces.VareInterface;
import interfaces.VareSalgInterface;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

/**
 *
 * @author Maja
 */
public class VareSalg extends UnicastRemoteObject implements VareSalgInterface {

    private int id;
    private int antal;
    private int salgsPris;
    private VareInterface vare;

    public VareSalg(int id, int antal, int salgsPris, VareInterface vare) throws RemoteException {
        this.id = id;
        this.antal = antal;
        this.salgsPris = salgsPris;
        this.vare = vare;
    }

    public VareSalg(int antal, int salgsPris, VareInterface vare) throws RemoteException {
        this.antal = antal;
        this.salgsPris = salgsPris;
        this.vare = vare;
    }

    public int getId() throws RemoteException {
        return id;
    }

    public int getAntal() throws RemoteException {
        return antal;
    }

    public int getSalgsPris() throws RemoteException {
        return salgsPris;
    }

    @Override
    public VareInterface getVare() throws RemoteException {
        return vare;
    }

}
